<extend name="../layout" />

<block name="main_content">
    <include file="Common:SettingsHeader:member" />
    <div class="row-fluid">
        <div class="span5">
            <div class="widget-box">
                <div class="widget-title"> <span class="icon"> <i class="icon-info-sign"></i> </span>
                    <h5>{:L('base_info')}</h5>
                </div>
                <div class="widget-content nopadding">
                    <form class="form-horizontal" method="POST" action="__URL__/update">
                        <div class="control-group">
                            <label class="control-label">{:L('email')}:</label>
                            <div class="controls">
                                <input type="email" class="span11" value='{$vo.email}' readonly />
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">{:L('username')}:</label>
                            <div class="controls">
                                <input type="text" class="span11" value='{$vo.truename}' name="username">
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">{:L('truename')}:</label>
                            <div class="controls">
                                <input type="text" class="span11" value='{$vo.truename}' name="truename">
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">{:L('password')}:</label>
                            <div class="controls">
                                <input type="text" class="span11" value="" placeholder="{:L('set empty if do not change')}" name="password">
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">{:L('cellpone')}:</label>
                            <div class="controls">
                                <input type="text" class="span11" value="{$vo.phone}" name="phone">
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">{:L('department')}:</label>
                            <div class="controls">
                                <html:select options='departments' selected='vo[department_id]' />
                            </div>
                        </div>
                        <div class="form-actions">
                            <input type='hidden' name="id" value="{$vo.id}" />
                            <button type="submit" class="btn btn-success">{:L('Save')}</button>
                            <a href="javascript:history.go(-1);" class="btn btn-primary">{:L('go_back')}</a>
                        </div>
                    </form>
                </div>
            </div>
        </div>
        <div class="span3">
            <div class="widget-box">
                <div class="widget-title"> <span class="icon"> <i class="icon-info-sign"></i> </span>
                    <h5>{:L('user_group_info')}</h5>
                </div>
                <div class="widget-content nopadding">
                    <form class="form-horizontal" method="POST" action="{:U('/HOME/User/editGroup')}">
                        <div class="control-group">
                            <div class="controls" style="margin-left:20px;">
                                <volist name="allGroups" id="ag">
                                    <label>
                                        <if condition="in_array($ag[id],$seletedGroups)">
                                          <input type="checkbox" value="{$ag.id}" name="group_id[]" checked />
                                        <else />
                                          <input type="checkbox" value="{$ag.id}" name="group_id[]" />
                                        </if>
                                        {$ag.title}
                                    </label>
                                </volist>
                            </div>
                        </div>
                        <div class="form-actions">
                            <input type='hidden' name="id" value="{$vo.id}" />
                            <button type="submit" class="btn btn-success">{:L('Save')}</button>
                        </div>
                    </form>
                </div>
            </div>
        </div>
        <div class="span4">
        </div>
    </div>
    
</block>